#include "gtkpopovermenu.h"
#include "gtkshortcutswindow.h"
+/* A handful of containers inside GTK+ are cheating and widgets
+ * inside internal structure as direct children for the purpose
+ * of forall().
+ */
+#define SPECIAL_CONTAINER(x) (GTK_IS_ASSISTANT (x) || \
+ GTK_IS_ACTION_BAR (x) || \
+ GTK_IS_POPOVER_MENU (x) || \
+ GTK_IS_SHORTCUTS_SECTION (x) || \
+ GTK_IS_SHORTCUTS_WINDOW (x))
+
/**
* SECTION:gtkcontainer
* @Short_description: Base class for widgets which contain other widgets
GObjectNotifyQueue *nqueue;
if (_gtk_widget_get_parent (child) != (GtkWidget *)container &&
- !GTK_IS_ASSISTANT (container) &&
- !GTK_IS_ACTION_BAR (container) &&
- !GTK_IS_POPOVER_MENU (container))
+ !SPECIAL_CONTAINER (container))
{
/* This can happen with internal children of complex widgets.
* Silently ignore the child properties in this case. We explicitly
g_return_if_fail (GTK_IS_WIDGET (child));
g_return_if_fail (cr != NULL);
- g_assert (_gtk_widget_get_parent (child) == GTK_WIDGET (container));
+ g_assert (_gtk_widget_get_parent (child) == GTK_WIDGET (container) ||
+ SPECIAL_CONTAINER (container));
if (!gtk_container_should_propagate_draw (container, child, cr))
return;